#!/bin/sh
import_and_dump() {
	cd $1
	gradle deployToGlassfish
	sleep 2
	mysqldump -u$1 -p$1 $1 > ../$1_schema.sql
	gradle runImport
	mysqldump -u$1 -p$1 $1 > ../$1_data.sql
	cd ..
}

import_and_dump capacity
import_and_dump product
import_and_dump offers
import_and_dump gui


#mysqldump -uroot -proot offer > offer_schema.sql
mysqldump -uroot -proot offer > offer_data.sql
